package lhdx8;

public class VeterinarianTest {
    public static void main(String[] args) {
        Veterinarian a=new Veterinarian("老张");
        Pet b=new Dog("阿黄","哈士奇",25,59);
        if ( b instanceof Dog ){
            System.out.println("狗");
            Dog b1=(Dog)b;
            a.cure(b);
            b1.jie();
        }else if (b instanceof Parrot) {
            System.out.println("鹦鹉");
            Parrot b2=(Parrot)b;
            a.cure(b);
            b2.fei();
           // Pet c = new Parrot("阿黄", "白毛鹦鹉", 4, 67);
        }
    }
}
